package com.woniuxy.consume.feign;

import com.woniuxy.consume.fallback.ProductFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(name = "spring-product",fallback = ProductFallback.class) //被调用方的服务名称
public interface ProductFeign {
    //其中的url为：http://{name}/{RequestMapping} http://spring-product/getProduct/{msg}
    @RequestMapping("/getProduct/{msg}")
    String getProduct(@PathVariable("msg") String msg);
}
